﻿// register your Gadget's namespace
registerNamespace("Microsoft.Live.GadgetSDK");

// define the constructor for your Gadget (this must match the name in the manifest xml)
Microsoft.Live.GadgetSDK.WebWrapperGadget = function(p_elSource, p_args, p_namespace) {
    // always call initializeBase before anything else!
	Microsoft.Live.GadgetSDK.WebWrapperGadget.initializeBase(this, arguments);

    // setup private member variables
	var m_this = this;
	var m_el = p_elSource;
	var m_module = p_args.module;
	var m_iframe = null;


	/****************************************
	**          initialize Method
	****************************************/
    // initialize is always called immediately after your object is instantiated
	this.initialize = function(p_objScope)
	{
	    // always call the base object's initialize first!	
		Microsoft.Live.GadgetSDK.WebWrapperGadget.getBaseMethod(this, "initialize", "Web.Bindings.Base").call(this, p_objScope);

        var url = "http://localhost/WindowsLiveInABox/Gadgets/WebWrapper/content.htm";
        
        m_el.innerHTML = "<iframe src=\"" + url + "\" frameborder=\"0\" scrolling=\"no\" />"
                
	
	};
	Microsoft.Live.GadgetSDK.WebWrapperGadget.registerBaseMethod(this, "initialize");
	
	
	/****************************************	
	**           dispose Method
	****************************************/
	this.dispose = function(p_blnUnload) {
	    	    
	    // null out all member variables
	    m_this = null;
	    m_el = null;
	    m_module = null;
	    
	    m_iframe = null;
	    
        // always call the base object's dispose last!	
		Microsoft.Live.GadgetSDK.WebWrapperGadget.getBaseMethod(this, "dispose", "Web.Bindings.Base").call(this, p_blnUnload);
	};
	Microsoft.Live.GadgetSDK.WebWrapperGadget.registerBaseMethod(this, "dispose");

	/****************************************
	** Other Methods
	****************************************/
	
	

};
Microsoft.Live.GadgetSDK.WebWrapperGadget.registerClass("Microsoft.Live.GadgetSDK.WebWrapperGadget", "Web.Bindings.Base");
